package com.own.business.system.menu.entity.map;

import com.own.business.system.menu.entity.po.SystemRole;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * SystemRoleMapVo
 *
 * @author chenxueli
 * @date 2024-03-31 09:22:58
 */
@Schema(title = "系统角色" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class SystemRoleMapVo extends BaseMap<SystemRole> implements Serializable {

    @Schema(title = "角色名称")
    private String name;

    @Schema(title = "客户端id")
    private String clientId;

    @Schema(title = "是否禁用 1=禁用 0=可用")
    private Integer isDisable;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public SystemRoleMapVo(@NonNull SystemRole entity) {
        super(entity);
        this.name = entity.getName();
        this.clientId = entity.getClientId();
        this.isDisable = entity.getIsDisable();
    }

}
